<?php


namespace app\common\model\mysql;


use think\Model;

class SpecsValue extends Model
{
    public function getNormalBySpecsId($id)
    {
        $res = $this->where([
            'specs_id' => $id,
            'status' => 1,
        ])->select();

        return $res;
    }

    public function add($data)
    {
        return $this->save($data);
    }

    public function del($id)
    {
        $this->where(['id' => $id])->save(['status' => 99]);
    }

    public function getNormalInIds($specs_value_ids)
    {
        return $this->whereIn('id', $specs_value_ids)->where(['status' => 1])->select()->toArray();
    }
}